{extend name="admin/base" /}
{block name="resources"/}
<script type="text/javascript" src="__STATIC__/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="__STATIC__/bootstrap/css/bootstraps.css"></script>
<style>
.mytable {border: 0;}
.style0list tbody td {vertical-align: middle;}
.style0list  tbody tr {border-bottom: 1px dashed  #E3E3E3;}
a{
	cursor:pointer;
}
.head-portrait{
	width: 50px;
    height: 50px;
	float: left;
    padding-right:10px;
}
.modal-infp-style{
width:90%;
	margin:10px auto;
}
.modal-infp-style table{
	width:100%;
}
.modal-infp-style table tr td{
	border: 1px solid #e6e6e6;
    padding: 10px;
}
#balance {
	margin-bottom:0;
}
#point {
	margin-bottom:0;
}
#remark_point{
	margin-bottom:0;
}
#remark_balance{
	margin-bottom:0;
}
.mytable select {
    width: 206px;
}
#form_type{
	height:32px;
	color:#999;
}
</style>
{/block}
{block name="right_tab"}

{/block}
{block name="main"}
<div class="mod-table">
	<div class="mod-table-head">
		<table class="mytable">
			<tr>
				<th width="10%">
					<input type="text" id='startDate' placeholder="请选择开始日期" class="input-medium" onclick="WdatePicker()"/>
					<input type="text" id='endDate' placeholder="请选择结束日期" class="input-medium" onclick="WdatePicker()" />

					<select name="account_type" id="account_type">
						<option value="">请选择类别</option>
						<option value="1">{$point_str}</option>
						<option value="2">{$cash_str}</option>
						<option value="3">购物币</option>
						<option value="4">{$share_str}</option>
						<option value="5">{$stock_str}</option>
						<option value="6">{$credit_str}</option>
						<option value="7">数字货币</option>
					</select>

					<input type="text" id='search_text' placeholder="请输入会员昵称" />
					<input type="button" onclick="searchData()" value="搜索" />
				</th>
			</tr>
		</table>
		<div class="style0list">
			<table>
				<thead>
					<tr align="center">
						<th>ID</th>
						<th class="tal">会员昵称</th>
						<th class="tal">类别</th>
						<th class="tal">数量</th>
						<th class="tal">描述</th>
						<th>时间</th>
<!-- 						<th>状态</th> -->
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
<!-- 					{foreach name="list['data']" item="v"} -->
<!-- 					<tr> -->
<!-- 						<th><input type="checkbox"/></th> -->
<!-- 						<th>银币兑换</th> -->
<!-- 						<th>-5</th> -->
<!-- 						<th>银币兑换余额</th> -->
<!-- 						<th>2016-9-10</th> -->
<!-- 					</tr> -->
<!-- 					{foreach} -->
				</tbody>
			</table>
		</div>
	</div>
</div>

{/block}
{block name="script"}
<script type="text/javascript">
	function LoadingInfo(page_index) {
		var search_text = $("#search_text").val();
		var start_date = $("#startDate").val();
		var end_date = $("#endDate").val();
		var account_type = $("#account_type").val();
		$.ajax({
			type : "post",
			url : "ADMIN_MAIN/Mine/diglist",
			async : true,
			data : {
				"page_index" : page_index, "page_size" : $("#showNumber").val(), "search_text":search_text, "account_type":account_type, "start_date":start_date, "end_date":end_date
			},
			success : function(data) {
				console.log(data);
				var html = '';
				if (data["data"].length > 0) {
					for (var i = 0; i < data["data"].length; i++) {
						html += '<tr align="center">';
                        html += '<td class="tal">'+ data["data"][i]["id"] +'</td>'
						html += '<td class="tal">'+ data["data"][i]["nick_name"] +'</td>'
						html += '<td class="tal">'+data["data"][i]["account_type"]+'</td>';
						html += '<td class="tal">'+ data["data"][i]["number"] +'</td>';
						html += '<td class="tal">'+ data["data"][i]["text"] +'</td>';
						html += '<td align="center">'+ data["data"][i]["create_time"] +'</td>';
                        html += '<td align="center"><a href="ADMIN_MAIN/Mine/DigRecDel?id='+ data["data"][i]["id"] +'">删除</a></td>';
						html += '</tr>';

					}
				} else {
					html += '<tr align="center"><th colspan="9">暂无符合条件的数据记录</th></tr>';
				}
				$(".style0list tbody").html(html);
				initPageData(data["page_count"],data['data'].length,data['total_count']);
				$("#pageNumber").html(pagenumShow(jumpNumber,$("#page_count").val(),{$pageshow}));
			}
		});
	}
	//全选
	function CheckAll(event){
		var checked = event.checked;
		$(".style0list tbody input[type = 'checkbox']").prop("checked",checked);
	}

	function searchData(){
		LoadingInfo(1);
	}

</script>
{/block}
